STEP 4: We'll use a loop to roll our number cube so we can repeat the action a lot of times.

  • In LOGIC, click on . Drag out Loop with Range.
  • Change the integer in range from 5 to 10. This means we'll roll the number cube ten times!
  • Click on . Drop Random Integer indented in the loop.

Remember, an indent is four spaces or 1 tab. Properly indented loop code will have a ····¬ before it.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)